<template>
    <div>
        <span>简短评论：</span><br>
        <span @click="fn()" :style="e">看过</span>  <span @click="fn2()" :style="d">想看</span><br>
        <input type="text" v-model="a"><br>
        <button @click="tian()">发布</button>
    </div>
     
</template>
<script>
 export default{
    data(){
        return{
            a:'',
            b:'看过',
            c:'想看',
            d:'',
            e:'',
            
        }
     },
     methods:{
       tian(){
         this.$emit('rong',this.a)
       },
       fn(){
        this.$emit('kan',this.b)
        this.e = 'background-color: aqua;'
        this.d = ''
       },
       fn2(){
        this.$emit('xiang',this.c)
         this.d = 'background-color: aqua;'
         this.e = ''
       }
     }
 }
</script>